package com.ysd.lis.controller;


import com.ysd.common.Result;
import com.ysd.lis.controller.pub.BaseController;
import com.ysd.lis.entity.SysRuleSet;
import com.ysd.lis.request.RuleSetListParam;
import com.ysd.lis.service.SysRuleSetService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

/**
 * <p>
 * 规则设置 前端控制器
 * </p>
 *
 * @author LiuQi
 * @since 2024-01-31
 */
@Api(tags = "规则设置")
@RestController
@RequestMapping("/api/rule/set")
public class SysRuleSetController extends BaseController {

    @Autowired
    public SysRuleSetService sysRuleSetService;

    @ApiOperation("获取规则设置列表")
    @GetMapping("/getSysRuleSetList")
    public Result getSysRuleSetList(RuleSetListParam ruleSetListParam) {
        return sysRuleSetService.getRuleSetList(ruleSetListParam);
    }
    @ApiOperation("添加规则设置")
    @PostMapping("/addSysRuleSet")
    public Result addSysRuleSet(@RequestBody SysRuleSet sysRuleSet) {
        return sysRuleSetService.addRuleSet(sysRuleSet);
    }
    @ApiOperation("编辑规则设置")
    @PostMapping("/updateRuleSet")
    public Result updateRuleSet(@RequestBody SysRuleSet sysRuleSet) {
        return sysRuleSetService.updateRuleSet(sysRuleSet);
    }
    @ApiOperation("删除规则设置")
    @PostMapping("/removeRuleSet")
    public Result removeRuleSet(@RequestBody SysRuleSet sysRuleSet) {
        return sysRuleSetService.removeRuleSet(sysRuleSet);
    }
}
